﻿function Input(camera) {

    var _camera = camera;

    $(document).keydown(function (e) {
        switch (e.which) {
            case 37: // left
                _camera.turn(util.radians(1));
                break;
            case 38: // up
                _camera.y--;
                break;
            case 39: // right
                _camera.turn(util.radians(-1));
                break;
            case 40: // down
                _camera.y++;
                break;

            default: return; // exit this handler for other keys
        }
        e.preventDefault();
    });
}
